package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallSpecificAttribute;
import com.appkubes.mall.core.po.MallSpecificAttributeExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallSpecificAttributeMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_attribute
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSpecificAttributeSqlProvider.class, method="countByExample")
    long countByExample(MallSpecificAttributeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_attribute
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallSpecificAttributeSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallSpecificAttributeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_attribute
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_specific_attribute",
        "where specific_attribute_key = #{specificAttributeKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String specificAttributeKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_attribute
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_specific_attribute (specific_attribute_key, app_key, ",
        "specific_type_key, specific_attribute_code, ",
        "specific_attribute_name, specific_attribute_index)",
        "values (#{specificAttributeKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{specificTypeKey,jdbcType=VARCHAR}, #{specificAttributeCode,jdbcType=VARCHAR}, ",
        "#{specificAttributeName,jdbcType=VARCHAR}, #{specificAttributeIndex,jdbcType=INTEGER})"
    })
    int insert(MallSpecificAttribute record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_attribute
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallSpecificAttributeSqlProvider.class, method="insertSelective")
    int insertSelective(MallSpecificAttribute record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_attribute
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSpecificAttributeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="specific_attribute_key", property="specificAttributeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_type_key", property="specificTypeKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_attribute_code", property="specificAttributeCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_attribute_name", property="specificAttributeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_attribute_index", property="specificAttributeIndex", jdbcType=JdbcType.INTEGER)
    })
    List<MallSpecificAttribute> selectByExampleWithRowbounds(MallSpecificAttributeExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_attribute
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSpecificAttributeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="specific_attribute_key", property="specificAttributeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_type_key", property="specificTypeKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_attribute_code", property="specificAttributeCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_attribute_name", property="specificAttributeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_attribute_index", property="specificAttributeIndex", jdbcType=JdbcType.INTEGER)
    })
    List<MallSpecificAttribute> selectByExample(MallSpecificAttributeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_attribute
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "specific_attribute_key, app_key, specific_type_key, specific_attribute_code, ",
        "specific_attribute_name, specific_attribute_index",
        "from mall_specific_attribute",
        "where specific_attribute_key = #{specificAttributeKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="specific_attribute_key", property="specificAttributeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_type_key", property="specificTypeKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_attribute_code", property="specificAttributeCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_attribute_name", property="specificAttributeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_attribute_index", property="specificAttributeIndex", jdbcType=JdbcType.INTEGER)
    })
    MallSpecificAttribute selectByPrimaryKey(String specificAttributeKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_attribute
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSpecificAttributeSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallSpecificAttribute record, @Param("example") MallSpecificAttributeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_attribute
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSpecificAttributeSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallSpecificAttribute record, @Param("example") MallSpecificAttributeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_attribute
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSpecificAttributeSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallSpecificAttribute record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_attribute
     *
     * @mbg.generated
     */
    @Update({
        "update mall_specific_attribute",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "specific_type_key = #{specificTypeKey,jdbcType=VARCHAR},",
          "specific_attribute_code = #{specificAttributeCode,jdbcType=VARCHAR},",
          "specific_attribute_name = #{specificAttributeName,jdbcType=VARCHAR},",
          "specific_attribute_index = #{specificAttributeIndex,jdbcType=INTEGER}",
        "where specific_attribute_key = #{specificAttributeKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallSpecificAttribute record);
}